﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.Migrations;
using CSharpChores415.Data.Models;

namespace CSharpChores.Data
{
    public static class Seeder
    {
        public static void Seed(ApplicationDbContext db)
        {
            db.Kids.AddOrUpdate(
                k => k.KidId,
                new Kid() { KidId = 1, KidName = "Buffy" },
                new Kid() { KidId = 2, KidName = "Addicus" },
                new Kid() { KidId = 3, KidName = "Phelonius"}
                );
            db.Chores.AddOrUpdate(
                c => c.ChoreId,
                new Chore() { ChoreId = 1, ChoreName = "Pig washing" },
                new Chore() { ChoreId = 2, ChoreName = "celebrity viewing" },
                new Chore() { ChoreId = 3, ChoreName = "Do the dishes" }

                );

            db.KidChores.AddOrUpdate(
                t => t.KidchoreId,
                new KidChore() { KidchoreId = 1, ChoreId = 2, KidId = 1 },
                new KidChore() { KidchoreId = 2, ChoreId = 2, KidId = 2 },
                new KidChore() { KidchoreId = 3, ChoreId = 1, KidId = 3 },
                new KidChore() { KidchoreId = 4, ChoreId = 3, KidId = 1 },
                new KidChore() { KidchoreId = 5, ChoreId = 3, KidId = 2 }
                );
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
        }


    }
}
